home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 045 (1988-02-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 045 (1988-02-15)(Ossowski, Stefan)(DE)(PD).adf / Iff2Pcs / Source / pzabout.c < prev    next >
C/C++ Source or Header  |  1988-01-20  |  2KB  |  77 lines

  1. #include "pz.h"
  2.  
  3. /* IFF2PCS help box code.
  4. ** Ali Ozer, Nov 1987
  5. */
  6.  
  7. #define ABOUTBOXLEFTMARGIN 5L
  8.  
  9. static long cury;
  10.  
  11. WL (wrp, line)
  12. struct RastPort *wrp;
  13. char *line;
  14. {
  15.   Move (wrp, ABOUTBOXLEFTMARGIN, (cury+=9L));
  16.   Text (wrp, line, (long)strlen(line));
  17. }
  18.  
  19.  
  20. struct NewWindow hw = {
  21.   15, 13, 605, 92, -1, -1, 
  22.   ACTIVEWINDOW, BORDERLESS | SIMPLE_REFRESH, 
  23.   NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, CUSTOMSCREEN
  24. };
  25.  
  26. extern struct Screen *picscr;
  27. extern struct Window *picwin;
  28.  
  29. /* Approx memory required per plane (and background) of help window...
  30. */
  31. #define SCRSIZEPERPLANE 16000
  32.  
  33. int DoAboutBox (boxcolor, textcolor)
  34. int boxcolor, textcolor;
  35. {
  36.   struct Window *win;
  37.   struct RastPort *wrp;
  38.  
  39.   hw.Screen = picscr;
  40.  
  41.   /* Safety check! */
  42.   if ((AvailMem (MEMF_CHIP) < SCRSIZEPERPLANE * picscr->BitMap.Depth) ||
  43.       ((win = OpenWindow (&hw)) == NULL)) return (false);
  44.   wrp = win->RPort; 
  45.   
  46.   SetRast (wrp, (long)boxcolor);
  47.   SetBPen (wrp, (long)boxcolor);
  48.   SetAPen (wrp, (long)textcolor);
  49.   SetDrMd (wrp, JAM2);
  50.   cury = 0;
  51. WL(wrp, COPYRIGHT);
  52.   cury += 3;
  53. WL(wrp,
  54. "Put the picture back together from the pieces. To grab a piece, move the");
  55. WL(wrp,
  56. "mouse over it and click the left button. To rotate a piece (90 degrees CW)");
  57. WL(wrp,
  58. "first grab it, then click the right button. To see what the full picture");
  59. WL(wrp,
  60. "looks like, choose the SHOW option from the menu. To see how close you are");
  61. WL(wrp,
  62. "to the solution, choose the CHECK option. ");
  63.   cury += 3;
  64. WL(wrp,
  65. "Many thanks go to: D. John Hodgson (for the small IFF reader), Tom Rokicki");
  66. WL(wrp,
  67. "(for the bitmap rotations), and Helene (Lee) Taran (for the popup menus &");
  68. WL(wrp,
  69. "her many suggestions). Please read the IFF2PCS.DOC file for more info.");
  70.  
  71.   Wait ((1L << win->UserPort->mp_SigBit) | (1L << picwin->UserPort->mp_SigBit));
  72.   CloseWindow (win);
  73.   return (true);
  74. }
  75.  
  76.  
  77.